package yxy.cherry.chat;

import yxy.apple.http.server.converter.Converter;
import yxy.banana.launcher.JSONBeanConfiguration;
import yxy.cherry.game.base.mq.MqConfig;
import yxy.cherry.game.base.redis.RedisClass;

public class Configuration extends yxy.banana.launcher.Configuration {
	static {
		SharedKey = "yxy.cherry.game.configuration.shared.key";
	}

	public static Configuration shared() {
		return JSONBeanConfiguration.shared(Configuration.SharedKey, Configuration.class);
	}

	public static class HTTPServerClass {
		public String LocalIP = "127.0.0.1";
		public int Threads = 20;
		public int MaxGatewayInteractionTimeout = 5000;
		public int Port = 8080;
		public SSLClass SSL = null;
	}

	public static class SSLClass {
		public boolean Enabled = false;
		public String CertificateFilename = null;
		public String PublicKeyFilename = null;
	}

	public static class InternalClientClass {
		public String RouteCenterIP = "0.0.0.0";
		public int RouteCenterPort = 0;
		public int Channels = 0;
		public int Threads = 0;
		public int PatrolInterval = 10000;
		public int HeartbeatInterval = 10000;
		public int HeartbeatResponseTimeout = 5000;
		// public int HeartbeatResponseDelayAlertThreshold = 1000;
		public int RegistryResponseTimeout = 5000;
	}

	public InternalClientClass InternalClient = null;

	public RedisClass UserRedis = null;
	public RedisClass GameRedis = null;
	public RedisClass DataRedis = null;

	public MqConfig MqConfig = null;

	public boolean DataCenterCache = true;

	public HTTPServerClass HTTPServer = null;
	public String URLpackageName;
	public Converter[] Converters = null;

	public String DBAccountConfig;
	public String DBGameConfig;

	public int MessageStationThreads = 64;
}
